#include "VSPEBeginFunction.h"
#include "VSGraphicInclude.h"
using namespace VSEngine2;
IMPLEMENT_RTTI(VSPEBeginFunction,VSPostEffectFunction)
static bool gs_bStreamRegistered_VSPEBeginFunction= VSPEBeginFunction::RegisterMainFactory ();
bool VSPEBeginFunction::ms_bRegisterMainFactory = false;
bool VSPEBeginFunction::RegisterMainFactory()
{
	if (!ms_bRegisterMainFactory)
	{ 
		VSMain::AddInitialFuntion(VSPEBeginFunction::InitialClassFactory); 
		ms_bRegisterMainFactory = true;
	} 
	return ms_bRegisterMainFactory;

}
bool VSPEBeginFunction::InitialClassFactory()
{
	ms_ClassFactory.AddElement(ms_Type.GetName(),FactoryFunc);

	return 1;
}
VSObject * VSPEBeginFunction::FactoryFunc()
{
	return VS_NEW VSPEBeginFunction();

}
VSPostEffectSceneRender * VSPEBeginFunction::CreateSceneRender()
{
	return NULL;
}
void VSPEBeginFunction::OnDraw(VSCuller & Culler,double dAppTime)
{

}
VSPEBeginFunction::VSPEBeginFunction(const VSUsedName & ShowName,VSPostEffectSet * pPostEffectSet)
:VSPostEffectFunction(ShowName,pPostEffectSet)
{

	VSOutputNode * pOutNode = NULL;
	pOutNode = VS_NEW VSOutputNode(VSPutNode::PET_OUT,_T("OutColor"),this);
	VSMAC_ASSERT(pOutNode);
	m_pOutput.AddElement(pOutNode);
	m_pBeginTargetArray = NULL;
}
VSPEBeginFunction::~VSPEBeginFunction()
{
	m_pBeginTargetArray = NULL;
}
VSPEBeginFunction::VSPEBeginFunction()
{
	m_pBeginTargetArray = NULL;
}